<?php
$this->headTitle('Tài khoản người dùng','append');
?>
<div class="dashboard-menu dashboard-admin">
    <span class="back">&nbsp;</span>
    <h1>Tài khoản người dùng</h1>
        <a class="btn btn-danger" href="<?php echo $this->url(array('module'=>'admin', 'controller'=>'user', 'action'=>'add'));?>">
            Thêm mới
        </a>
</div>
<div class="row placeholders">
    <div class="col-md-12">
        <div class="widget-big">
            <div class="table table-responsive">
                <div class="search-result">
                    <table class="table table-bordetext-danger table-striped table-condensed table-hover" border="0" cellspacing="0" cellpadding="0">
                        <thead>
                            <tr class="warning">
                                <th style="width:5%;">ID</th>
                                <th style="width:10%;">Username</th>
                                <th style="width:15%;">Email</th>
                                <th style="width:15%;">Tên</th>
                                <th style="width:10%;">Di động</th>
                                <th style="width:7%;" class="text-right">Số dư</th>
                                <th style="width:8%;">Bài đăng</th>                                
                                <th style="width:10%;" class="text-right" >Ngày tham gia</th>
                                <th style="width:10%;">Đăng nhập cuối</th>
                                <th style="width:10%;">Chức năng</th>
                            </tr>
                        </thead>
                        <tbody>
                        <?php
                            foreach ($this->userList as $user){
                        ?>
                            <tr>
                                <td style="width:5%;" class="text-left"><?php echo $user['id'];?></td>
                                <td style="width:10%;" class="text-left"><?php echo $user['username'];?></td>
                                <td style="width:15%;" class="text-left"><?php echo $user['email'];?></td>
                                <td style="width:15%;" class="text-left"><?php echo $user['fullname'];?></td>
                                <td style="width:10%;" class="text-left"><?php echo $user['mobile'];?></td>                                
                                <td style="width:7%;" class="text-right"><?php echo $user['gold'];?></td>
                                <td style="width:8%;" class="text-left"><?php echo $user['qty'];?></td>                                                               
                                <td style="width:10%;" class="text-right"><?php echo date("Y-m-d",$user['join']);?></td>
                                <td style="width:10%;" class="text-left"><?php echo date("Y-m-d H:i",$user['last']);?></td>
                                <td style="width:10%;" class="text-right">                                
                                    <a class="glyphicon glyphicon-pencil" href="<?php echo $this->url(array('module'=>'admin', 'controller'=>'user', 'action'=>'edit', 'id'=>$user['id']))?>" title="Sửa thông tin tài khoản"></a>
                                    &nbsp;&nbsp;                                
                                    <a class="glyphicon glyphicon-remove" href="<?php echo $this->url(array('module'=>'admin', 'controller'=>'user', 'action'=>'delete', 'id'=>$user['id']))?>" title="Xoá tài khoản"></a>
                                </td>
                            </tr>
                        <?php
                            } 
                        ?>
                        </tbody>
                    </table>
                </div>
            </div>
            <div class="clearfix"></div>
        </div>
    </div>
</div>